<template>
  <el-form-item label="上传地址">
    <el-input v-model="obj.action"></el-input>
  </el-form-item>
  <el-form-item label="是否支持多选">
    <el-switch v-model="obj.multiple" />
  </el-form-item>
  <el-form-item label="是否启用拖拽上传">
    <el-switch v-model="obj.drag" />
  </el-form-item>
  <el-form-item label="上传按钮提示" v-if="!obj.drag">
    <el-input v-model="obj.button"></el-input>
  </el-form-item>
  <el-form-item label="上传按钮颜色" v-if="!obj.drag">
    <el-color-picker v-model="obj.color" />
  </el-form-item>
  <el-form-item label="拖拽面板提示" v-if="obj.drag">
    <el-input v-model="obj.upload_text"></el-input>
  </el-form-item>
</template>

<script lang="ts">
export default {
  name: 'jUploadConfig'
}
</script>

<script lang="ts" setup>
import { toRefs, defineProps } from 'vue'
import { type Basis } from '@/types/element'
const props = defineProps<{
  obj: Basis
}>()

const { obj } = toRefs(props)
</script>

<style scoped></style>
